Introduction
Hello, mIRC scripter!
If you ever tried to create
mIRC dialogs calculating all the coordinates manually you’ve already known what
a pain it is. There exist some dialog editors for mIRC written in different programming
languages but none of them can compete with professional tools by software
giants.
Dialog Grabber offers you an
alternative way to create mIRC dialogs: design them in your favorite
application builder, compile fake executables and have DG convert them into
mIRC dialog tables.
After having unzipped
“DlgGrab.zip” you’ll find:
·
Dialog Grabber 5.9.exe – the stand-alone executable
file,
·
Dialog Grabber 5.9 Source
Code – the source code (Visual C++ 6.0
workspace),
·
Dialog Grabber Examples – the examples (.mrc scripts),
·
Readme.htm – this document.
The source code can only be
interesting for advanced users. You may find some of the examples useful as
templates for your own dialogs.
DG doesn’t make any changes
in the Windows registry, so uninstalling is simple – just delete everything you
no longer need.
1. Added support for scroll bar controls introduced mIRC
5.9.
Version 5.82 is a minor update of 5.81.
2. Fixed the bug with combo and list boxes.
Version 5.81 is final (bug-fix updates may follow).
Something’s been added, something’s been fixed and something’s been removed
since 5.8:
3. More precise calculations.
4. Removed the “DBU (Windows)” scaling mode.
5. Removed the “Generate alias” and “Generate header”
checkboxes.
6. The code has been completely rewritten using the
object-oriented approach.
7. Removed the commas at the end of every dialog item
line.
8. Added support for multi-line text.
9. Added support for menu resources.
First public release.
I’ll illustrate the process
of creating mIRC dialog tables with DG assuming you use Visual C++:
1. Create a new empty Win32 Application. Name it “First”.
2. Insert a new dialog (IDD_DIALOG1) into the project
(“Insert/Resource/Dialog -> New”), drop some controls onto it.
3. Insert a new menu (IDR_MENU1) into the project
(“Insert/Resource/Menu -> New”), add some menu items.
4. Return to IDD_DIALOG1 and set it’s menu to IDR_MENU1.
5. Create a new C++ source file as follows:
#include <windows.h>
#include "resource.h"
BOOL CALLBACK DialogFunc(HWND hWnd,UINT msg,WPARAM
wParam,LPARAM)
{
if ((msg == WM_COMMAND) && (wParam ==
MAKELONG(IDCANCEL,BN_CLICKED)))
EndDialog(hWnd,0);
return 0;
}
int WINAPI WinMain(HINSTANCE,HINSTANCE,LPSTR,int)
{
return DialogBox(0,MAKEINTRESOURCE(IDD_DIALOG1),0,DialogFunc);
}
6. Save the resource definition script file as First.rc
and add it to the project (“Add To Project -> Files”).
7. Press Ctrl+F5 to compile and run your small
application. If everything is OK, close Visual C++.
8. Run Dialog Grabber, choose “Browse” and open your
First.exe. In the listbox you’ll see the title of your dialog. Select it and
choose “View”. Looks great, doesn’t it :).
9. Click on the “Grab” button and select a file to append
the mIRC dialog table to.
1. Dialog Grabber calculates
coordinates for icons (like “;icon id, x y w h, noborder”) but it doesn’t extract them from the executable. You
need to add the “filename” and the “index” yourself.
2. Tabs aren’t supported
because Windows tab controls are different from mIRC ones – they don’t
“contain” other controls.
3. Dialog Grabber can only
extract standard Windows dialogs. Visual Basic, Delphi and some other RAD tools
do NOT create Windows dialogs and DG won’t find anything. However, Visual C++ can
import Visual Basic forms (“Insert/Resource/Dialog -> Import”).
It doesn’t mean DG forces
you to use Visual C++, no. There must be tons of other (commercial and free)
dialog editors for Windows.
You are free to develop and
modify the source code without any copyright restrictions.
Sincerely yours,
Necroman.
necroman@wot.net, #mIRC @ Undernet